package com.example.tellwin.mine.presenter;

import android.text.TextUtils;

import com.example.tellwin.api.TwjfApi;
import com.example.tellwin.base.RxPresenter;
import com.example.tellwin.base.SimpleCallback;
import com.example.tellwin.home.bean.ContentBean;
import com.example.tellwin.mine.contract.FeeDescriptionContract;

import javax.inject.Inject;

/**
 * @author : LinZePeng
 * @date : 2020/12/1
 * @Describe ：
 **/
public class FeeDescriptionPresenter extends RxPresenter<FeeDescriptionContract.View> implements FeeDescriptionContract.Presenter<FeeDescriptionContract.View> {

    private TwjfApi mApi;

    private int pages;
    private int pageNum;
    private final int pageSize = 10;
    private boolean isNotMore = true;

    @Inject
    public FeeDescriptionPresenter(TwjfApi mApi) {
        this.mApi = mApi;
    }

    @Override
    public void getBillingInstructions() {
        mApi.getBillingInstructions(new SimpleCallback<ContentBean>(mView) {
            @Override
            public void onSuccess(ContentBean contentBean) {
                if(!TextUtils.isEmpty(contentBean.getBillingInstructions())){
                    mView.billingInstructionsResult(contentBean.getBillingInstructions());
                }
            }

            @Override
            public void onFail(String msg) {

            }
        });
    }
}
